'''
name = "wangyuhang"
age = 19
if name and age:
    # print('{}今年{}岁了'.format(name,age))
else:
    print("gameover")
'''


'''
# range(n)==range(0,n) [0,n)
for i in range(3):
    print("hello",i)
'''

'''
# range(开始,结束,步长)
# 1 6 11 16 ... 96
for i in range(1,100,5):
    print(i)
'''



'''
if 10 > 7 :
    print(10,"是大的")
else:
    pass # 占位符
print("判断结束")
'''


'''
n=1
while n<100 :
    print(n)
    n+=1
'''


############字符串#################
'''
s1="123"
s2="123"
s3="01234"
'''

'''
字符串0  1  2  3  4
下标  0  1  2  3  4
     -5 -4 -3 -2 -1
str[开始:结束:步长]

print(s1 is s2) #True 比较地址
print(s1==s2) #True 比较值
print(s3==s2) #False
print(s2+s3) #12301234 字符串连接
print(s1*3) #123123123
print(s3[0:3]) #012 str[开始:结束] 左闭右开
print(s3[0:-1]) #0123
print(s3[:]) #01234
print(s3[-1::-1]) #43210
print(s3[-1::-2]) #420
'''

'''
# 大小写替换
str="qwertERW"
print(str.lower())
print(str.upper())

'''

'''
# 字符串匹配
print("234" in "1234") #True
print("13" in "1234") #False
'''

'''
find(字符串,开始,结束) 指定开始和结束范围 
rfind 图片名  后缀名
lfind
replace(old,new,[max替换个数])
startwith()
endwith()


img="https://image.baidu.com/tupian.jpg"
print(img.find('/')) #6从左找
print(img.rfind('/')) #23从右找
print(img[img.rfind('/')+1:])#打印文件名 tupian.jpg
str="i'm glad to meet you"
print(str.replace(" ", ""))# 去除空格 i'mgladtomeetyou
print(img.startswith("http"))#True
print(img.endswith("jpg")) #true
'''


'''
msg="上课了"
result=msg.encode('utf-8') #b'\xe4\xb8\x8a\xe8\xaf\xbe\xe4\xba\x86'
print(result)
msg=result.decode('utf-8')
print(msg) #上课了
'''

'''
msg='-'.join('1234')
print(msg)
print("nice to meet you".split(' '))
print("nice to meet you".split(' ',1))
print("nice to meet you".count(' '))
'''


str="    dfd    "
str.lstrip()
print("8"+str.strip()+"8")


